package com.pks.datacenter.entity.theme;

import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;

import com.pks.util.coder.database.DBField;
import com.pks.util.coder.database.DBQuery;
import com.pks.util.coder.database.DBTable;
import com.pks.web.mybatis.entity.BasicEntity;

/**
 * 主题关联数据表
 * @author pks
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
@DBTable(tags = "主题关联数据表" )
public class ThemeDbInfo extends BasicEntity {

	private static final long serialVersionUID = 690931200915837057L;

	public static final int TYPE_MASTER = 1; // 主表
	public static final int TYPE_FOREIGN = 2;   // 信息表
	
	@DBQuery
	@DBField(comment = "主题ID")
	private Long themeId;
	
	@DBQuery
	@DBField(comment = "数据表ID")
	private Long dbInfoId;
	
	@DBField(comment = "查询条件" , type = "text")
	private String queryJson;
	
	@DBField(comment = "描述")
	private String content;
	
	@DBField(comment = "主外键字段，根据type判断")
	private String fieldName;
	
	@DBField(comment = "排序号")
	private Long orders;
	
	@DBQuery
	@DBField(comment = "类型")
	private Integer type;
	
	@DBField(comment = "附表信息列表")
	private List<ThemeDbInfo> show_foreignList;
	
}
